import request from 'utils/request.js'
// 获取文章列表
let getArtList = ( params = {} ) => request.get('/getArtList',{ params })
// 添加文章
let addArt = (params) => request.post('/addArt',params)
// 获取编辑文章
let getArt = (id) => request.get(`/getArt?id=${id}`)
// 添加修改后的文章
let updateArt = (params = {}) => request.post('/editArt',params)
// 删除文章
let delArt = (id) => request.post('/delArt',{id})
// 登录
let toLogin = (params = {}) => request.post('/login',params)

export {
  getArtList,
  addArt,
  getArt,
  updateArt,
  delArt,
  toLogin
}